<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page session="false" %>

<div class="box">
	<c:forEach items="${patients}" var="patient">
		<p>Name: ${patient.firstName} ${patient.lastName} (${patient.age.year}), ${patient.address.suburb.name } ${patient.address.postCode }
			<a href="patient/edit/${patient.idPatient}">Edit</a> 
			<a href="patient/delete/${patient.idPatient}">Delete</a> 
			<a href="child/add/${patient.idPatient}">Add child</a></p>
			<ul>
			<c:forEach items="${patient.children}" var="child">
				<li>${child.name } (${child.gender.description}), age: ${child.age.year} years, ${child.age.month} months, ${child.age.day} days</li>
			</c:forEach>
			</ul>
	</c:forEach>
	<br/>
	<input type="button" value="New Patient" class="button" id="add-patient-btn" />
</div>